import type { AuditFields } from "../audit-fields";

export enum MenuType {
  页面 = 0,
  目录 = 1,
  功能 = 2,
  信息 = 3,
  子系统 = 4,
}

export enum MenuBehavior {
  隐藏 = 0,
  禁用 = 1,
  提示 = 2,
}

interface SysMenu extends AuditFields {
  pid?: number | null;
  type: MenuType;
  code: string;
  title: string;
  path: string;
  redirect?: string;
  icon?: string;
  behavior: MenuBehavior;
  isDisabled: boolean;
  sortId?: number;
  description?: string;
}

interface MenuInfo extends SysMenu {
  parentName?: string;
  children?: MenuInfo[];
  actions?: MenuInfo[];
}

export type { SysMenu, MenuInfo };
